package org.bl.chat.common.exception;

/**
 * 业务异常类
 */
public class BusinessesException extends RuntimeException {

    private final int code;

    public BusinessesException(int code, String message) {
        super(message);
        this.code = code;
    }

    public BusinessesException(String message) {
        super(message);
        this.code = 400; // 默认业务异常码
    }

    public int getCode() {
        return code;
    }
}
